package com.deng.api.dto;

import com.baomidou.mybatisplus.annotation.*;

import com.deng.api.entity.SysRole;
import com.deng.commons.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@TableName("sys_user")
@ApiModel(value = "User对象", description = "系统用户表")
public class UserDTO extends BaseEntity {


    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("账号")
    private String username;

    @ApiModelProperty("昵称")
    private String name;

    @ApiModelProperty("绑定产品ID")
    private Integer productId;

    @ApiModelProperty("所属公司id")
    private Integer companyId;

    @ApiModelProperty("所属公司")
    private String companyName;

    @ApiModelProperty("头像地址")
    private String avatar;

    @ApiModelProperty("提示消息")
    private String promptMessage;

    @ApiModelProperty("是否可用")
    private String enabled;

    @ApiModelProperty("上次登录时间")
    private String lastLoginTime;

    @ApiModelProperty("角色信息")
    //不为数据库字段，但是又必须使用
    @TableField(exist = false)
    private List<SysRole> roles;

}
